package com.ship.boats.service.impl;

import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ship.boats.domain.SpBoatsInspectionsDefects;
import com.ship.boats.mapper.SpBoatsInspectionsDefectsMapper;
import com.ship.boats.service.SpBoatsInspectionsDefectsService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <b>SpBoatsInspectionsDefectsServiceImpl</b>
 *
 * @description: SpBoatsInspectionsDefectsServiceImpl <br>
 * @date: 2024/3/26 16:50 <br>
 * @author: lhm <br>
 * @version: 1.0 <br>
 */

@Service
public class SpBoatsInspectionsDefectsServiceImpl extends ServiceImpl<SpBoatsInspectionsDefectsMapper,SpBoatsInspectionsDefects> implements SpBoatsInspectionsDefectsService {
    private static final Logger logger = LoggerFactory.getLogger(SpBoatsInspectionsDefectsServiceImpl.class);

    @Autowired
    private SpBoatsInspectionsDefectsMapper spBoatsInspectionsDefectsMapper;

    @Override
    public boolean createInspectionsDefects(List<SpBoatsInspectionsDefects> inspectionsDefectsList) {
        logger.info("批量保存缺陷列表:{}"+ JSONUtil.parse(inspectionsDefectsList));
        boolean b = saveBatch(inspectionsDefectsList);
        return b;
    }
}
